<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>用于显示Code的页面</title>
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.slim.min.js"></script>
    <style>
        html, body {
            height: 100vh;
            margin: 0;
            padding: 0;
        }

        body {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        #code {
            resize: none;
            width: 100%;
            height: 100px;
        }
    </style>
</head>
<body>
<noscript>

</noscript>
<div>
    <div>复制下面的Code</div>
    <div>粘贴到PyOneDesk管理后台对应的OneDrive账号</div>
    <div><textarea id="code"></textarea></div>
</div>
<script>
  window.addEventListener('load', function() {
    const query = {}
    window.location.search.slice(1).split('&').map(query => query.split('=')).forEach(q => {
      query[q[0]] = q[1]
    })
    if(!query['code'])
      return alert('缺少Code参数，请不要自行打开这个页面')

    const $code = $('#code')
    $code.val(query['code'])
    $code.mouseover(function() {
      $(this).select()
    })
  })
</script>
</body>
</html>